package ssm.service;

import ssm.myPojo.PerCustom;
import ssm.myPojo.PubCustom;
import ssm.myPojo.SourQueryVo;
import ssm.pojo.Per;
import ssm.pojo.User;

import java.util.List;

public interface UserService {

    //验证用户是否存在
    public User findUserByName(String name)throws Exception;

    //通过id查找用户
    public User findUserById(Integer id)throws Exception;

    //获取所有资源的类型
    public List<String> selectAllType()throws Exception;

    //选取所有pub资源
    public List<PubCustom> findAllPubByLike(SourQueryVo sourQueryVo)throws Exception;

    //注册用户：插入用户信息
    public void signUser(String username,String pwd)throws Exception;

    //修改用户信息
    public void updateUser(User user)throws Exception;

    //通过类型查找资源
    public List<PubCustom> findPubByType(String Type)throws Exception;

    //通过id在个人资源中查找
    public List<PerCustom> findPerByName(String name)throws Exception;

    //通过id在公开资源中查找
    public List<PubCustom> findPubByName(String name)throws Exception;

    //插入资源到pub
    public void insertIntoPub(PubCustom pubCustom)throws Exception;
    //插入资源到per
    public void insertIntoPer(PerCustom perCustom)throws Exception;
}
